<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="../node_modules/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app"><p id="testa">{{num}}</p></div>
  <script>
    new Vue({
      el: "#app",
      data: {
        num: 100
      },
      mounted () {
        this.num++
      },
      beforeUpdate (){
        console.log('beforeUpdate', document.getElementById('testa').innerHTML)
        this.num++
        // console.log('beforeUpdate', this.num) 
        // // setTimeout(() => {
        //   this.num++
        // // });
      },
      updated() {
        console.log('updated', document.getElementById('testa').innerHTML)
        // this.num++
      }
    })
    //.$mount('#app')
  </script>
</body>

</html>